<div class="form">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'product-form',
        'enableAjaxValidation' => false,
        'htmlOptions' => array('enctype' => 'multipart/form-data'),
            ));
    ?>
    <?php echo $form->errorSummary($model); ?>
    <fieldset>
        <legend>产品信息</legend>
        <table cellspacing="0" cellpadding="0" class="Ftable">
            <tr>
                <th width="150"><?php echo $form->labelEx($model, 'name'); ?></th>
                <td><?php echo $form->textField($model, 'name', array('size' => 40, 'maxlength' => 128)); ?></td>
            </tr>
            <tr>
                <th><?php echo $form->labelEx($model, 'category_id'); ?></th>
                <td><?php echo $form->dropDownList($model, 'category_id', ProductCategory::model()->getCategories()); ?></td>
            <tr>
            <tr>
                <th><?php echo $form->labelEx($model, 'model'); ?></th>
                <td><?php echo $form->textField($model, 'model', array('size' => 30, 'maxlength' => 128)); ?></th>
            </tr>
            <tr>
                <th><?php echo $form->labelEx($model, 'producer'); ?></th>
                <td><?php echo $form->textField($model, 'producer', array('size' => 30, 'maxlength' => 128)); ?></td>
            </tr>
            <tr>
                <th><?php echo $form->labelEx($model, 'number'); ?></th>
                <td><?php echo $form->textField($model, 'number', array('size' => 30, 'maxlength' => 128)); ?></td>
            </tr>
            <tr>
                <th><?php echo $form->labelEx($model, 'specification'); ?></th>
                <td><?php echo $form->textField($model, 'specification', array('size' => 30, 'maxlength' => 128)); ?></td>
            <tr>
            <tr>
                <th><?php echo $form->labelEx($model, 'thumb'); ?></th>
                <td><?php echo $form->fileField($model, 'thumb'); ?></td>
            </tr>
            <tr>
                <th><?php echo $form->labelEx($model, 'introduce'); ?></th>
                <td>
                    <?php
                    $this->widget('application.extensions.tinymce.ETinyMce', array(
                        'model' => $model, 
                        'attribute' => 'introduce',
                        'useSwitch' => false,
                        'editorTemplate' => 'full'
                    ));
                    ?>
                </td>
            <tr>
            <tr>
                <th></th>
                <td><?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?></td>
            </tr>
        </table>
    </fieldset>
    <?php $this->endWidget(); ?>
</div>